#ifndef GETGRAPHY_H
#define GETGRAPHY_H

#include <chrono>

#include "raylib.h"

class Geography {
public:
	Geography() {}
	void update(std::chrono::nanoseconds delt);
	void draw();
	void init();
	
	Vector3 getEarthPos() {
		return m_earthPos;
	}
private:
	
	const float m_ratio = 1e-6*2;
	//const float m_distrance{ 149597870 * m_ratio };
	const float m_distrance{ 14597870 * m_ratio };
	const float m_earthPoleRadius{ 6356.9088f * m_ratio };
	const float m_earthEquatorialRadius{ 6377.830f * m_ratio };
	const float m_sunRadius{ 696300 * m_ratio };
	const float m_yellowAndRedAngle = 23.26; // 黄赤夹角
	float m_earthAngleRotation = 0;
	Vector3 m_earthPos{ m_distrance, 0, 0 };
	Vector3 m_sunPos {0,0,0};
	Vector3 m_redRoadZNormal;
	Vector3 m_redRoadYNormal;
	Vector3 m_redRoadXNormal;
};

#endif
